const {BrowserWindow} = require('electron')
const path = require('path')


let videoWindow

function createVideoWindow(mainWindow, title) {

    videoWindow = new BrowserWindow({
        modal: true,
        autoHideMenuBar: true,
        resizable: false,
        height: 530,
        useContentSize: true,
        title: title,
        width: 350,
        // frame: false,
        webPreferences: {
            nodeIntegration: true,
            contextIsolation: false,
        }
    })

    videoWindow.loadFile(path.resolve(__dirname, "../../main/static/video.html"))

    // videoWindow.on('closed', () => {
    //     videoWindow = null
    // })

    return videoWindow;

}

module.exports = createVideoWindow
